package com.htl.线程.实现线程;

/**
 * 方法一：继承Thread类
 */
public class MyThreadTest {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();
    }
}


class MyThread extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(i+"---myThread");
        }
    }
}

